home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / clipper / ks94an.zip / Q_CONFIR.HDR < prev    next >
Text File  |  1994-04-25  |  2KB  |  60 lines

  1. /******************************************************************************
  2.                  The Klipper Library, for CA-Clipper 5.x
  3.         Copyright (c), 1994, Wallace Information Systems Engineering
  4.  
  5. FUNCTION:
  6.  
  7. _Q_Confirm( cConfirm_Desc, nQRowMod, nQColMod ) --> lYesNo
  8.  
  9. PARAMETERS:
  10.  
  11. cConfirm_Desc : Question to ask
  12. nQRowMod      : Row Modification Value    (Default 0)
  13. nQColMod      : Column Modification Value (Default 0)
  14.  
  15. SHORT:
  16.  
  17. Asks a Y/N Question, returning TRUE or FALSE.
  18.  
  19. DESCRIPTION:
  20.  
  21. _Q_Confirm asks a "Yes or No" question supplied in cConfirm_Desc and returns
  22. a logical indicating the entered response.  The response box is centered
  23. on the screen.
  24.  
  25. The default message, if not specified, is a plain vanilla "Yes or No?
  26. (y/n)" message.  I suggest you specify one to avoid User-Mayhem.
  27.  
  28. nQRowMod and nQColMod are ADDED to these defaults and can be use to move
  29. the box off-center.  To move the box up or to the left, use negative values.
  30.  (ie, nGColMod = -5, would cause the box to to be first centered, but
  31. then moved -5 Columns to the right (Adding negative numbers effectively
  32. causes a move to the LEFT, or 5 columns to the LEFT).
  33.  
  34. NOTE:
  35.  
  36.  
  37.  
  38. EXAMPLE:
  39.  
  40. t = _Q_Confirm('Is it raining outside?')
  41.  
  42. Result: t = a logical .t. / .f. depending upon user response.
  43.  
  44.  
  45. _Q_Confirm() can be used as an in-line assignment, making it possible to ask
  46. question in the middle of other function call (embedding it's return value as
  47. the parameter for another function) or program statements as in:
  48.  
  49. if _Q_Confirm('Did lightning really strike your Aunt Mabels Big Toe?')
  50.     @ 10,10 say "I'm so sorry..."
  51. else
  52.     @ 10,10 say 'My! What big tales you tell...'
  53. endif
  54.  
  55. if DestroyEverything(_Q_Confirm('Really?"))
  56.     DESTROY EVERYTHING
  57. endif
  58.  
  59. ******************************************************************************/
  60.